home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / tess / tess-1.0 / pm.m < prev    next >
Encoding:
Text File  |  1992-06-30  |  886 b   |  46 lines

  1. #import "aGroup-inter.h"
  2. #import "aGroup.h"
  3. #import "pm.h"
  4.  
  5. @implementation pm
  6. - resizeGenerator
  7. {
  8.   latticesize.height = 2.0*bounds.size.height;
  9.   latticesize.width = bounds.size.width;
  10.   upx = [angle1slide floatValue] * latticesize.width;
  11.   printf("Angleslider%f\n",[angle1slide floatValue]);
  12.   upy = bounds.size.height;
  13.   overx = latticesize.width - abs(upx);
  14.   gravy = upy/2;
  15.   gravx = (upx+overx)/2;
  16.   return self;
  17. }
  18.  
  19. - makeLatticeUnitAt: (NXPoint *) point fromImage: srcimg 
  20. {
  21.   id imgrep;
  22.   NXPoint pt;
  23.   
  24.   pt.x = - point->x ;
  25.   pt.y = - point->y ;
  26.   imgrep = [srcimg bestRepresentation];
  27.   PSgsave();
  28.   [self clip:0.0:0.0];
  29.   [imgrep drawAt: &pt];
  30.   PSgrestore();
  31.   PSgsave();
  32.   reflect(0.0);
  33.   [self clip:0.0:0.0];
  34.   [imgrep drawAt: &pt];
  35.   PSgrestore();
  36.   return self;
  37. }
  38.  
  39. - upTranslatePoint: (NXPoint *)pt
  40. {
  41.   pt->x += 0;
  42.   pt->y += latticesize.height;
  43.   return self;
  44. }
  45. @end
  46.